<?php $mainbar = 'main';
 $pageId="page-cart";
?>
@extends('ios.pageIndex')

@section('page-content')
<div class="content-padded m-cart-content">
	<h3 class="title">购物车</h3>
	<em class="notice">
	  <span>满@config('mao.free_postage_limit')元免运费</span><br>
	  <span class="tip">国际地区运费请咨询客服：<a href="tel:400-710-8990" class="external">400-710-8990</a></span>
	</em>
	<div class="m-cart-list">
		<div class="text-center">
	        <span style="width:42px; height:42px" class="preloader"></span>
	      </div>
	</div>
	
	<a href="#" class="button button-big m-button" id="submit-cart" data-url="{{URL::to('order/check-quantity')}}">立即结算</a>
	<form action="{{URL::to('order-form')}}" method="get" id="order-from">
    	{{Form::token()}}
    </form>
</div>
@stop

@section('script')
<script type="text/template7" id="cartTemplate">
<div class="list-block media-list no-padded font-normal">
  <ul>
    @{{#each products}}
    <li id="product@{{id}}-@{{size_id}}-@{{color_id}}" data-id="@{{id}}" data-size_id="@{{size_id}}" data-color_id="@{{color_id}}" data-quantity="@{{quantity}}" data-price="@{{price}}">
	  <div class="item-content border-bottom external">
        <div class="item-media"><a href="@{{url "product/" id}}" class="external"><img src="@{{imgurl image w="72" h="84"}}"></a></div>
        <div class="item-inner">
		  
          <div class="item-title-row top">
            <div class="item-title"><a href="@{{url "product/" id}}" class="external">@{{enname}}</a></div>
            <div class="item-after"><span class="action delete" href="#">&times;</span></div>
          </div>
		  <div class="item-subtitle"><a href="@{{url "product/" id}}" class="external">@{{name}} <em class="unenough"></em></a></div>
		  @{{#if size_id}}
              <div class="item-subtitle"><a href="@{{url "product/" id}}" class="external">尺寸：@{{size}}</a></div>
          @{{/if}}
          @{{#if color_id}}
              <div class="item-subtitle"><a href="@{{url "product/" id}}" class="external">颜色：@{{color}}</a></div>
          @{{/if}}
          <div class="item-title-row bottom">
            <div class="item-title">
                 <span class="action minus" href="#">&minus;</span><span class="quantity border">@{{quantity}}</span><span  class="action plus" href="#">+</span>
            </div>
            <div class="item-after product-fee">¥@{{mfnumber price quantity}}</div>
          </div>
        </div>
      </div>
    </li>
    @{{/each}}
  </ul>
</div>

<div class=" fee">
	<div class="row">
       <div class="col-50">
          <div><a href="#" onClick="window.history.back();"><i class="fa-icon fa-icon-angle-double-left"></i> 继续购物</a></div>
       </div>
       <div class="col-50 text-right">
			<div>
		                     小计：¥<span id="products-fee">@{{fnumber fee.productsFee}}</span>元</br>
                                                运费：¥<span id="postage">@{{fnumber fee.postage}}</span>元</br>
                                               总计：¥<span id="total-fee">@{{fnumber fee.totalFee}}</span>元</br>
            </div>
        </div>
    </div>
</div>
</script>
@stop
